package com.example.mybatispdemo.store.service;

import com.example.mybatispdemo.store.entity.SupplierEntity;
import com.baomidou.mybatisplus.extension.service.IService;


import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author ljp
 * @since 2022-10-31
 */
public interface ISupplierService extends IService<SupplierEntity> {
    /**
     *
     * 添加供应商
     * @param supplier
     * @return boolean
     */
    public boolean addSupplier(SupplierEntity supplier);
    /**
     * 根据id查找供应商
     * @param id
     * @return boolean*/
    public SupplierEntity getSupplierById(Integer id);
    /**
     *
     * 根据供应商名查找供应商
     * @param name
     * @return com.example.mybatispdemo.store.entity.SupplierEntity
     */
    public List<SupplierEntity> getSupplierByName(String name);

    /**
     *
     * 根据id更新供应商
     * @param id
     * @return boolean
     */
    public boolean updateSupplierById(Integer id,SupplierEntity supplier);
    /**
     *
     * 删除供应商
     * @param id
     * @return boolean
     */
    public boolean deleteSupplierById(Integer id);
    /**
     *
     * 删除所有供应商
     * @param
     * @return boolean
     */
    public boolean deleteAll();
}
